classDiagram
    direction TB

    class User {
        String usercode
        String pwd
        String username
        String deptName
    }

    class UserQuery {
        String usercode
        String pwd
    }

    class PageQuery {
        Integer pageid
        Integer pagesize
    }

    class UserDTO {
        // Add fields as per your UserDTO class
    }

    class UserMapper {
        <<interface>>
        +IPage<UserDTO> listPage(Page<UserDTO> page, String deptName)
    }

    class IUserService {
        <<interface>>
        +IPage<UserDTO> listPage(PageQuery pageVo, String deptName)
    }

    class UserServiceImpl {
        +IPage<UserDTO> listPage(PageQuery pageVo, String deptName)
    }

    class UserController {
        +ApiResult login(UserQuery userQuery)
        +ApiResult addUser(UserQuery userQuery)
        +ApiResult getUser(Integer userId)
        +ApiResult deleteUser(Integer userId)
        +ApiResult getLoginUser(Principal principal)
        +ApiResult listPage(Principal principal, PageQuery pageVo)
        +ApiResult setSession(HttpServletRequest request)
        +ApiResult getSession(HttpServletRequest request)
    }

    UserMapper <|-- UserServiceImpl
    IUserService <|-- UserServiceImpl
    UserServiceImpl --> UserMapper
    UserController --> IUserService
    UserController --> UserQuery
    UserController --> PageQuery
    UserController --> User
    UserController --> Principal
    UserController --> HttpServletRequest